package com.ming.controller;

import com.ming.po.Food;
import com.ming.po.ResponseBean;
import com.ming.service.FoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/FoodController")
public class FoodController {

	@Autowired
	private FoodService fs;

	// 根据商家Id查询该商家的商品信息
	@GetMapping("/listFoodByBusinessId")
	public ResponseBean<List<Food>> listFoodByBusinessId(Integer businessId){
		return fs.listFoodByBusinessId(businessId);
	}
}
